package com.server.questionbank.snframe.service.CourseService;

import com.server.questionbank.snframe.controller.Course.pojo.AddExercises;
import com.server.questionbank.snframe.controller.Course.pojo.Exercises.UpdateExercises;
import com.server.questionbank.snframe.domain.Homework.TExercises;
import com.server.questionbank.snframe.domain.ResDTO.PageResult;
import com.server.questionbank.snframe.domain.Course.TKnowledge;

import java.util.List;

public interface TExerciseService {
    // 获取所有题目
    public PageResult<TExercises> getAllExercises(String sortField, String sortDirection,
                                                        Long pageNum, Long pageSize);
    // 获取所有课程题目
    public PageResult<TExercises> getAllCourseExercises(String sortField, String sortDirection,
                                                  Long pageNum, Long pageSize);
    // 获取所有竞赛题目
    public PageResult<TExercises> getAllCompetitionExercises(String sortField, String sortDirection,
                                                       Long pageNum, Long pageSize);

    // 根据 exercisesId 查询题目
    public TExercises getExercisesById(Long exercisesId);

    // 根据 knowledgeId 查询题目
    public PageResult<TExercises> getExercisesByKnowledgeId(Long knowledgeId, String sortField,
                                                      String sortDirection, Long pageNum, Long pageSize);

    // 根据 courseId 查询题目
    public PageResult<TExercises> getExercisesByCourseId(Long courseId, Boolean noChapter,
                                                            String sortField, String sortDirection, Long pageNum, Long pageSize);

    // 根据 chapterId 查询题目
    public PageResult<TExercises> getExercisesByChapterId(Long chapterId, String sortField,
                                                    String sortDirection, Long pageNum, Long pageSize);

    // 添加题目
    public Long addExercises(AddExercises exercises);

    // 绑定知识点
    public Long addKnowledge(Long exercisesId, List<TKnowledge> knowledges);

    // 清空知识点
    public Boolean clearKnowledge(Long exercisesId);

    // 修改题目
    public Boolean updateExercises(UpdateExercises exercises);
}
